fs: avoid possible NULL dereference in fs_devread
authorHeinrich Schuchardt <[email protected]>
Sun, 19 Nov 2017 22:49:21 +0000 (23:49 +0100)
committerTom Rini <[email protected]>
Thu, 30 Nov 2017 03:30:50 +0000 (22:30 -0500)
commit24f48416dfe1d827dcf759d6cd0e7a8e5c67e321
treea7e03593cbaff32b04b97c716428e629d016c3ba
parent254eedee7f383066b70ac4da01bc792a3256a4b3
fs: avoid possible NULL dereference in fs_devread

It is unwise to first dereference a variable
and then to check if it was NULL.

Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Marek Behun <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
fs/fs_internal.c